#if !defined(__UI_APP_H__)
#define __UI_APP_H__

#include "lvgl.h"

#define APP_EVENT_TYPE_NEXT 0
#define APP_EVENT_TYPE_CLICK 1
#define APP_EVENT_TYPE_CONFIRM 2

typedef struct app
{
    const char *const name;
    lv_timer_t *(*create)(lv_obj_t *parent, uint8_t id);
    void (*enter)(lv_timer_t *timer, void *user_data);
    void (*level)(lv_timer_t *timer, void *user_data);
    void (*delete)(lv_timer_t *timer, void *user_data);
    uint8_t (*update)(lv_timer_t *timer, void *user_data, uint8_t event);
    void *user_data;
} app_s, *app_t;

#endif // __UI_APP_H__
